<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>class 绑定</title>
    <style media="screen">
      .divDemo{
        height: 100px;
        width: 200px;
      }
      .classA{
        background-color: #999;
      }
      .classB{
        color: red;
      }
    </style>
  </head>
  <body>
    <div class="" id="app">
      <div class="divDemo" :class="classObj">
        测试
      </div>
    </div>
    <script src="js/jquery-1.8.3.min.js" charset="utf-8"></script>
    <script src="js/vue.js" charset="utf-8"></script>
    <script type="text/javascript">
      var vm;
      $(function(){
        vm = new Vue({
          el:'#app',
          data:{
            classObj:{
              'classA':true,
              'classB':true
            }
          }
        })
      })
    </script>
  </body>
</html>
